package com.zz.framework.core.http.intercept.okcurl

import android.util.Log
import okhttp3.Interceptor
import okhttp3.Response

class OkCurlInterceptor(private val tag: String) : Interceptor {

    override fun intercept(chain: Interceptor.Chain): Response {
        val request = chain.request()
        if (request.url.toUrl().path.contains("uploadFile").not()) {
            Log.d(tag, OkCurlWorker(request).work())
        }
        return chain.proceed(request)
    }

}